<div class="row">
  <div class="col-sm-6">
    <a href="#!" id="buy">Subscribe</a>

    <script type="text/javascript">
      function openCheckout(event) {
        event.preventDefault()
        Paddle.Checkout.open({
          customer: {
            id: "<%= @payment_processor.processor_id %>",
          },
          items: [
            {
              priceId: "pri_01hb6ts7ggtm9y62jkptd3hk1b",
              quantity: 1
            }
          ],
        })
      }
      document.getElementById('buy').addEventListener('click', openCheckout, false);
    </script>
  </div>
</div>
